<template>
	<view class="home">
		
		<view class="hot_product"   v-for="item in products" :key="item.id">
			
			
			<view class="tit_0"><text>订单号:{{item.orders}}</text></view>
			<hr style="color: #DCDCDC;">
			<view class="tit_1">
				<view class="tit_p">
					<text><strong>产品名称:</strong> </text>
					<view  style="margin: 10px;">
					   <text>{{item.title}}</text>
					</view>
				</view>
			</view>
			<view class="tit_2">
				<view class="tit_2_1" v-if="item.status==1" >
					<text>状态：待支付</text>
				</view>
				<view class="tit_2_1" v-if="item.status==2">
					<text>状态：待发货</text>
				</view>
				<view class="tit_2_1" v-if="item.status==3">
					<text>状态：待收货</text>
				</view>
				<view class="tit_2_1" v-if="item.status==4">
					<text>状态：已完成</text>
				</view>

				<view style="font-size: 15px;margin-left: 80px;" v-if="item.status==1">
					<text>支付方式:积分支付</text>
				</view>
				<view style="font-size: 15px;margin-left: 80px;" v-if="item.status==2">
					<text>支付方式:微信支付</text>
				</view>
				<view style="font-size: 15px;margin-left: 80px;" v-if="item.status==3">
					<text>支付方式:支付宝支付</text>
				</view>
			</view>
			<view style="font-size: 12px;padding-top: 5px;float: right;color: #909399;"><text>下单时间:{{item.c_time}}</text></view>
		</view>
	
     
	</view>
</template>

<script>
	import helper from '.../../common/helper.js';  
	export default {
		data() {
			return {
				id:0,
				products:[],
			}
		},
		onLoad(options) {
            this.status=options.status
			this.id=options.id
            this.getproducts()
		},
		methods: {
			// 获取产品详情页数据
			async getproducts () {
				const res = await this.$myRuquest({
					url: '/index/dsnv.activities/order_list?id='+this.id+'&status='+this.status
				})
	
				this.products = res.data
			},
			
        }
	}
</script>

<style lang="scss">

.home{
	
	background-color: #F6F6F6;
	height: 800px;
	padding: 0 20px;
	font-size: 14px;
	
	.hot_product{
		
		height: 150px;
		background-color: #F5F5F5;
		border: 1px solid #DCDCDC;
		border-radius: 12px;
		margin: 15px;
		
		padding: 0 5px;
		
		.tit_0{
			padding-top:10px;
			color: #909399;
		}
		.tit_1{
			
		}
		.tit_2{
			
			.tit_2_1{
				color: 	#006400;
				font-size: 15px;
			}
			font-size: 12px;
			display: flex;
		}
		
	}
	//
}

</style>
